/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entityBeans;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author allankv
 */
@Entity
@Table(name = "reproductivecondition")
@NamedQueries({
    @NamedQuery(name = "Reproductivecondition.findAll", query = "SELECT r FROM Reproductivecondition r"),
    @NamedQuery(name = "Reproductivecondition.findByIdreproductivecondition", query = "SELECT r FROM Reproductivecondition r WHERE r.idreproductivecondition = :idreproductivecondition"),
    @NamedQuery(name = "Reproductivecondition.findByReproductivecondition", query = "SELECT r FROM Reproductivecondition r WHERE r.reproductivecondition = :reproductivecondition")})
public class Reproductivecondition implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idreproductivecondition")
    private Integer idreproductivecondition;
    @Basic(optional = false)
    @Column(name = "reproductivecondition")
    private String reproductivecondition;
    @OneToMany(mappedBy = "reproductivecondition", fetch = FetchType.LAZY)
    private List<Occurrenceelement> occurrenceelementList;

    public Reproductivecondition() {
    }

    public Reproductivecondition(Integer idreproductivecondition) {
        this.idreproductivecondition = idreproductivecondition;
    }

    public Reproductivecondition(Integer idreproductivecondition, String reproductivecondition) {
        this.idreproductivecondition = idreproductivecondition;
        this.reproductivecondition = reproductivecondition;
    }

    public Integer getIdreproductivecondition() {
        return idreproductivecondition;
    }

    public void setIdreproductivecondition(Integer idreproductivecondition) {
        this.idreproductivecondition = idreproductivecondition;
    }

    public String getReproductivecondition() {
        return reproductivecondition;
    }

    public void setReproductivecondition(String reproductivecondition) {
        this.reproductivecondition = reproductivecondition;
    }

    public List<Occurrenceelement> getOccurrenceelementList() {
        return occurrenceelementList;
    }

    public void setOccurrenceelementList(List<Occurrenceelement> occurrenceelementList) {
        this.occurrenceelementList = occurrenceelementList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idreproductivecondition != null ? idreproductivecondition.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Reproductivecondition)) {
            return false;
        }
        Reproductivecondition other = (Reproductivecondition) object;
        if ((this.idreproductivecondition == null && other.idreproductivecondition != null) || (this.idreproductivecondition != null && !this.idreproductivecondition.equals(other.idreproductivecondition))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityBeans.Reproductivecondition[idreproductivecondition=" + idreproductivecondition + "]";
    }

}
